<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript"src="js/jquery.js"></script>

</head>
<body>
	<div id="div">
	</div>
	<script type="text/javascript">
		var one=function(){
			for (var i=0;i<10;i++){
				// var a=document.creatElement('a');  //创建文档对象
				$('div').append('<a>');
				$('a').last().text(i);
				$('a').on('click',function(e){
					e.preventDefault();
					alert($(this).text());
				})
			}
		}
		one();
	</script>
</body>
</html>